package cn.com.ghy.android.widget.salemag;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import cn.com.ghy.android.bean.YGOrderDetailInfoBean;
import cn.com.ghy.android.widget.R;

public class SaleOrderDetailInfoView extends Activity {

	private TextView txtDnm;
	private TextView txtBismt;
	private TextView txtOrdernum;
	private TextView txtOrderprice;
	private TextView txtVolum;
	private TextView txtVoleh;
	private TextView txtMatnr;
	private TextView txtWerks;
	private TextView txtLgort;
	private TextView txtIsfin;

	private YGOrderDetailInfoBean yGOrderDetailInfoBean;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.sale_order_detail_info_view);
		getSession();
		findView();
		setView();
	}

	private void findView() {
		txtDnm = (TextView) findViewById(R.id.txtDnm);
		txtBismt = (TextView) findViewById(R.id.txtBismt);
		txtMatnr = (TextView) findViewById(R.id.txtMatnr);
		txtOrdernum = (TextView) findViewById(R.id.txtOrdernum);
		txtOrderprice = (TextView) findViewById(R.id.txtOrderprice);
		txtVolum = (TextView) findViewById(R.id.txtVolum);
		txtVoleh = (TextView) findViewById(R.id.txtVoleh);
		txtWerks = (TextView) findViewById(R.id.txtWerks);
		txtLgort = (TextView) findViewById(R.id.txtLgort);
		txtIsfin = (TextView) findViewById(R.id.txtIsfin);
	}

	private void getSession() {
		yGOrderDetailInfoBean = (YGOrderDetailInfoBean) this.getIntent().getSerializableExtra(
				"yGOrderDetailInfoBean");
	}

	private void setView() {
		txtDnm.setText(yGOrderDetailInfoBean.getDnm());
		txtBismt.setText(yGOrderDetailInfoBean.getBismt());
		txtMatnr.setText(yGOrderDetailInfoBean.getMatnr());
		txtOrdernum.setText(yGOrderDetailInfoBean.getOrdernum());
		txtOrderprice.setText(yGOrderDetailInfoBean.getOrderprice());
		txtVolum.setText(yGOrderDetailInfoBean.getVolum());
		txtVoleh.setText(yGOrderDetailInfoBean.getVoleh());
		txtWerks.setText(yGOrderDetailInfoBean.getWerks());
		txtLgort.setText(yGOrderDetailInfoBean.getLgort());
		txtIsfin.setText(yGOrderDetailInfoBean.getIsfin());
	}
}
